projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3a5da8a
)
(run-at-time): Handle numbers as relative times in seconds, as the original
author
Roland McGrath
<roland@gnu.org>
Wed, 7 Feb 1996 16:54:50 +0000
(16:54 +0000)
committer
Roland McGrath
<roland@gnu.org>
Wed, 7 Feb 1996 16:54:50 +0000
(16:54 +0000)
code did.
lisp/timer.el
patch
|
blob
|
history
diff --git
a/lisp/timer.el
b/lisp/timer.el
index 94b681abdf0b910af1f0aae75e827bf3cbd8bcaf..adb44db7ca3c943ca94835e654a42e0af2f337b4 100644
(file)
--- a/
lisp/timer.el
+++ b/
lisp/timer.el
@@
-189,6
+189,10
@@
This function returns a timer object which you can use in `cancel-timer'."
(if (null time)
(setq time (current-time)))
+ ;; Handle numbers as relative times in seconds.
+ (if (numberp time)
+ (setq time (timer-relative-time (current-time) time)))
+
;; Handle relative times like "2 hours and 35 minutes"
(if (stringp time)
(let ((secs (timer-duration time)))